home *** CD-ROM | disk | FTP | other *** search
/ Deutsche Edition 1 / Deutsche Edition 1.iso / amok / 081-090 / amok88 / arexxbox / rxif.lha / rxif / rx_disable.c < prev    next >
C/C++ Source or Header  |  1993-05-16  |  812b  |  47 lines

  1.  
  2. /*
  3.  * Dieses Kommando sollte besser auch Kommandos lokal zu einem
  4.  * Host beeinflussen können. Vorschlag: Zusätzlicher Switch
  5.  * "GLOBAL/S" (Default wäre damit LOKAL).
  6.  *
  7.  */
  8.  
  9. void rx_disable( struct RexxHost *host, struct rxd_disable **rxd, long action, struct RexxMsg *rexxmsg )
  10. {
  11.     struct rxd_disable *rd = *rxd;
  12.     char **s;
  13.     struct rxs_command *rxc;
  14.  
  15.     switch( action )
  16.     {
  17.         case RXIF_INIT:
  18.             *rxd = calloc( sizeof *rd, 1 );
  19.             if( rd = *rxd )
  20.             break;
  21.             
  22.         case RXIF_ACTION:
  23.             /* Insert your code HERE */
  24.             
  25.             if( s = rd->arg.names )
  26.             {
  27.                 for( ; *s; s++ )
  28.                 {
  29.                     if( rd->arg.global )
  30.                     {
  31.                         if( rxc = FindRXCommand( *s ) )
  32.                             rxc->flags &= ~ARB_CF_ENABLED;
  33.                     }
  34.                 }
  35.             }
  36.             
  37.             break;
  38.         
  39.         case RXIF_FREE:
  40.             /* FREE your local data HERE */
  41.             free( rd );
  42.             break;
  43.     }
  44.     return;
  45. }
  46.  
  47.